package com.situ.web.service.impl;

import java.util.List;

import com.situ.web.dao.Impl.BanjiDaoImpl;
import com.situ.web.entity.Banji;
import com.situ.web.service.IBanjiService;

public class BanjiServiceImpl implements IBanjiService{
	BanjiDaoImpl banjiDao = new BanjiDaoImpl();
	
	@Override
	public List<Banji> selectAll() {
		List<Banji> list = banjiDao.selectAll();
		return list;
	}
	@Override
	public boolean delete(int id) {
		int count = banjiDao.delete(id);
		return count != 0 ? true:false;
	}

	@Override
	public boolean insert(Banji banji) {
		int count = banjiDao.insert(banji);
		return count == 1 ? true:false;
	}
	@Override
	public Banji selectId(int id) {
		Banji banji = banjiDao.selectId(id);
		return banji;
	}
	@Override
	public boolean update(Banji banji) {
		int count = banjiDao.update(banji);
		return count == 1 ? true:false;
	}

	
}
